package com.ang;

import com.alibaba.fastjson.JSONObject;
import lombok.Data;

import java.util.Arrays;
import java.util.List;

public class Test01 {

    public static void main(String[] args) {
        Test01 t = new Test01();
//        t.test1();

        int count = 10;
        for (int i = 0; i < count; i++) {
            System.out.println(i);
            count = count - 1;
        }
    }

    public void test1() {
        User user = new User();
        user.setName("t1");
        user.setList(Arrays.asList("s1", "s2", "s3"));

        String str = JSONObject.toJSONString(user);
        System.out.println(str);

        User user1 = JSONObject.parseObject(str, User.class);
        System.out.println(user1);
        System.out.println(user1.getList());

    }

    @Data
    static class User {
        String name;
        List<String> list;
    }
}
